package N2024.M11.D30;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25228
 * Date: 2025-02-28
 * Time: 21:12
 */
public class test3 {
    public static void main(String[] args) {
        int[] array={0,1,3,5,0,6,0};
        int s=array.length;
        for (int i = 0; i < s-1; i++) {
            if (array[i]==0){
                for (int j = i+1; j < s; j++) {
                    if(array[j]!=0){
                       int tmp=array[i];
                       array[i]=array[j];
                       array[j]=tmp;
                       break;
                    }
                }
            }
        }
        System.out.println(Arrays.toString(array));
    }
}
